/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal (path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validMobile (str) {
  return /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(
    str
  )
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validSNumber (str) {
  return /^[0-9]{10,12}$/.test(str)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validJobNumber (str) {
  return /^[wx|gl][0-9]{3,6}$/.test(str)
}
